<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改战队积分</title>
    <link href="$!webPath/css/template.css" rel="stylesheet" type="text/css"/>
    <link href="$!webPath/css/jquery-ui-1.8.22.custom.css" type="text/css" rel="stylesheet">
    <script src="$!webPath/js/jquery-1.6.2.js"></script>
    <script src="$!webPath/js/jquery-ui-1.8.21.js"></script>
    <script src="$!webPath/js/jquery.form1.js"></script>
    <style type="text/css">
        label.error {
            color: #F00;
            margin-left: 3px;
        }

        input.error {
            border: 2px solid #F00;
        }
        .cont_right{
            float: right;
            margin: 0 30px 10px 0;
        }
        .cont_right a{
            text-decoration: none;
        }
    </style>
</head>
<body>
<div class="header_nav">
    <iframe name="content_frame" src="$!webPath/admin/nav" marginwidth=0 marginheight=0  frameborder=0 width=100% height=80/></iframe>
    <div class="cont_right"><a href="$!webPath/login">注销</a></div>
</div>
<div class="cont">
    <h3 class="seth">编辑</h3>
    <div class="nav_list">
        <ul id="ul_table">
            <li><a href="$!webPath/admin/teamList?size=10&page=0"><b>战队列表</b></a></li>
            <li><a href="javascript:void(0);" class="this"><b>编辑</b></a></li>
        </ul>
    </div>
    <div class="adddetail">
        <form action="$!webPath/admin/" method="post" name="theForm" id="theForm">
            <div class="edit">
                <div class="setcont editul">

                    <ul class="set1">
                        <li class="setcont_bg">系列赛胜场</li>
                        <li>
                            <input name="seriesWins" id="seriesWins" type="text" value="$!team.seriesWins" size="30">
                        </li>
                    </ul>
                    <ul class="set1">
                        <li class="setcont_bg">总胜场</li>
                        <li>
                            <input name="winNum" id="winNum" type="text" value="$!team.winNum" size="30">
                        </li>
                    </ul>
                    <ul class="set1">
                        <li class="setcont_bg">系列赛负场</li>
                        <li>
                            <input name="seriesLose" id="seriesLose" type="text" value="$!team.seriesLose" size="30">
                        </li>
                    </ul>
                    <ul class="set1">
                        <li class="setcont_bg">总负场</li>
                        <li>
                            <span class="webname">
                              <input name="loseNum" id="loseNum" type="text" value="$!team.loseNum" size="30">
                            </span>
                        </li>
                    </ul>
                    <ul class="set1">
                        <li class="setcont_bg">平局数</li>
                        <li>
                            <span class="webname">
                              <input name="drawNum" id="drawNum" type="text" value="$!team.drawNum" size="30">
                            </span>
                        </li>
                    </ul>
                    <ul class="set1">
                        <li class="setcont_bg">队伍积分</li>
                        <li>
                            <span class="webname">
                              <input name="teamIntegral" id="teamIntegral" type="text" value="$!team.teamIntegral" size="30">
                            </span>
                        </li>
                    </ul>
                </div>
            </div>

            <input name="teamId" id="teamId" value="$!team.id" type="hidden"/>
        </form>
        <div class="submit">
            <span class="pad120">
        <input name="save" type="button" value="提交" id="saveForm">
        </span>
        </div>
    </div>
</div>
<script>
    $('#saveForm').click(function () {
        var seriesWins=$('#seriesWins').val();
        var winNum=$('#winNum').val();
        var seriesLose=$('#seriesLose').val();
        var loseNum=$('#loseNum').val();
        var drawNum=$('#drawNum').val();
        var teamIntegral=$('#teamIntegral').val();
        if(seriesWins==''||winNum==''||seriesLose==''||loseNum==''||drawNum==''||teamIntegral==''){
            alert('每一项都不能为空');
            return false;
        }
        $('#theForm').ajaxSubmit({
            type:'post',
            url:'$!webPath/admin/modifiedTeamScore',
            success: function () {
                window.location.href='$!webPath/admin/teamList?size=10&page=0';
            },
            error: function () {
                alert('失败');
            }
        })
    })
</script>
</body>
</html>